﻿using System;
using System.Runtime.InteropServices;

namespace Vtron.HipcConfigurationTools.Domain
{
    /// <summary>
    /// 
    /// </summary>
    /// <remarks>
    /// #define    IP_CODEC_IP_LEN 20
    /// 
    /// typedef struct
    /// {
    ///     Uint8 ipAddress[IP_CODEC_IP_LEN];          //ip地址
    ///     Uint8 netMask[IP_CODEC_IP_LEN];            //子网掩码
    ///     Uint8 gatway[IP_CODEC_IP_LEN];             //网关
    ///     Uint8 macAddress[IP_CODEC_IP_LEN];         //物理地址
    /// }T_HIPC_NET_INFO;
    /// </remarks>
    [Serializable]
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct T_HIPC_NET_INFO
    {
        #region Fields

        /// <summary>
        /// ip地址
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
        public byte[] ipAddress;

        /// <summary>
        /// 子网掩码
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
        public byte[] netMask;

        /// <summary>
        /// 网关
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
        public byte[] gatway;

        /// <summary>
        /// 物理地址
        /// </summary>
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
        public byte[] macAddress;

        #endregion
    }
}
